<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>后台登录</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<script type="text/javascript">
	  function codeChange(t)
	  {
	    t.src="marion.jpg?n="+Math.random();
	  }
	 	
	  function validate(){
			var c=document.forms[0].codeName.value; //得到第一个表单，是从0开始
			if(c==""){
				window.alert("请输入验证码");
				return false;
			}else{
				return true;
			}
		}	
	</script>
	</head>

	<body>


		<form action="loginManage.shtml" method="post"
			onsubmit="return validate();">
			<table border="0" align="center">

				<tr align="center">
					<td>
						<br>
						<h2>
							短信登录平台
						</h2>
						<br>
						帐&nbsp;&nbsp; 号:
						<input type="text" name="loginName" size="15">
						<br>
						密&nbsp;&nbsp; 码:
						<input name="password" type="text" size="15">
						<br>
						<img src="marion.jpg" width="100" height="25"
							onclick="codeChange(this);">
						看不请,点击
						<br>
						验证码:
						<input name="codeName" size="15">

						<br>
						<input name="b1" type="submit" value="登录">
						&nbsp;&nbsp;
						<input name="b2" type="reset" value="取消">
					</td>
				</tr>
			</table>
		</form>
	</body>
</html>
